
function chooseTab(indexTab,classChoose) {
    for (i = 1; i <= 4; i++) {
        document.getElementById("tab" + i).style.display = "none";
        document.getElementById("tab_control" + i).className = "";
    }
    var tabObj = document.getElementById("tab" + indexTab);
    var tabObjControl = document.getElementById("tab_control" + indexTab);
    tabObj.style.display = "";
    tabObjControl.className = classChoose;

}

function previous(indexTab, prefixSlide,total) {
    var indexTab = document.getElementById(indexTab).value - 1;
    var tabObj = document.getElementById(prefixSlide + indexTab);
    if (tabObj != null && tabObj != undefined) {
        for (i = 1; i <= total; i++) {
            document.getElementById(prefixSlide + i).style.display = "none";
        }

        tabObj.style.display = "";
    }

}

function next(indexTab, prefixSlide, total) {
    var indexTab = document.getElementById(indexTab).value + 1;
    var tabObj = document.getElementById(prefixSlide + indexTab);
    if (tabObj != null && tabObj != undefined) {
        for (i = 1; i <= total; i++) {
            document.getElementById(prefixSlide + i).style.display = "none";
        }

        tabObj.style.display = "";
    }

}

function searchProduct(textSearch) {

    document.location = "/SearchProduct.aspx?keyword=" + textSearch;
}